home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / plnk081.zip / pilot-link.0.8.1 / configure.in < prev    next >
Text File  |  1997-08-06  |  15KB  |  574 lines

  1.  
  2. # This is free software, licensed under the GNU Public License V2.
  3. # See the file COPYING for details.
  4.  
  5. dnl Process this file with autoconf to produce a configure script.
  6. AC_INIT(include/pi-cmp.h)
  7. AC_CONFIG_AUX_DIR(scripts)
  8.  
  9.  
  10. dnl Check host type
  11. AC_CANONICAL_HOST
  12.  
  13.  
  14. dnl Checks for programs.
  15. AC_PROG_CC
  16. AC_PROG_INSTALL
  17. AM_PROG_LIBTOOL
  18. AC_PROG_RANLIB
  19. AC_PROG_YACC
  20.  
  21. WITHTCL="WITHOUTTCL"
  22. WITHCXX="WITHOUTCXX"
  23. WITHTK="WITHOUTTK"
  24. WITHPERL5="WITHOUTPERL5"
  25. WITHPYTHON="WITHOUTPYTHON"
  26. WITHJAVA="WITHOUTJAVA"
  27.  
  28. AC_ARG_WITH(cpp,      [  --with-cpp[=c++ compiler]  use C++     [default=yes]])
  29.  
  30. if test "x$with_cpp" = "xno"; then
  31.     CXX=
  32.     ac_cv_prog_cxx_works=no
  33. else
  34.  
  35. if test "x$with_cpp" = "xyes"; then
  36.     with_cpp=""
  37. fi
  38.  
  39. if test "x$with_cpp" = "x"; then
  40.     AC_CHECK_PROGS(CXX,$CCC c++ g++ gcc CC cxx cc++, gcc)
  41. else
  42.     CXX=$with_cpp
  43. fi
  44.  
  45. AC_LANG_SAVE
  46. AC_LANG_CPLUSPLUS
  47. AC_CACHE_CHECK([whether C++ compiler ($CXX $CXFLAGS $LDFLAGS) works],
  48.   ac_cv_prog_cxx_works,
  49. [AC_TRY_COMPILE([#include <stdio.h>], [class a { public: int b; a::a(void); };
  50. a b; ],
  51.   ac_cv_prog_cxx_works=yes,ac_cv_prog_cxx_works=no)])
  52. AC_LANG_RESTORE
  53.  
  54. AC_PROG_CXX_GNU
  55.  
  56. if test $ac_cv_prog_gxx = yes; then
  57.   GXX=yes
  58. dnl Check whether -g works, even if CXXFLAGS is set, in case the package
  59. dnl plays around with CXXFLAGS (such as to build both debugging and
  60. dnl normal versions of a library), tasteless as that idea is.
  61.   ac_test_CXXFLAGS="${CXXFLAGS+set}"
  62.   ac_save_CXXFLAGS="$CXXFLAGS"
  63.   CXXFLAGS=
  64.   AC_PROG_CXX_G
  65.   if test "$ac_test_CXXFLAGS" = set; then
  66.     CXXFLAGS="$ac_save_CXXFLAGS"
  67.   elif test $ac_cv_prog_cxx_g = yes; then
  68.     CXXFLAGS="-g -O2"
  69.   else
  70.     CXXFLAGS="-O2"
  71.   fi
  72. else
  73.   GXX=
  74.   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
  75. fi
  76.  
  77. fi
  78.  
  79. ccexecs=''
  80. cclib=''
  81. libcclib=''
  82. SUBMAKE_COMM='cd $(top_builddir)/libsock ; $(MAKE) '
  83. SUBMAKE_COMM_CC='-true'
  84. EXT=''
  85. CXXLIBS=''
  86. if test $ac_cv_prog_cxx_works = yes; then
  87.   ccexecs='$(CCEXECS)'
  88.   cclib='libpicc.a'
  89.   libcclib='libcc/libpicc.a'
  90.   SUBMAKE_COMM_CC='cd $(top_builddir)/libcc ; $(MAKE) '
  91.   WITHCXX='WITHCXX'
  92. else
  93.   CXX=''
  94.   CXXFLAGS=''
  95. fi
  96. AC_SUBST(ccexecs)
  97. AC_SUBST(cclib)
  98. AC_SUBST(libcclib)
  99. AC_SUBST(SUBMAKE_COMM)
  100. AC_SUBST(SUBMAKE_COMM_CC)
  101. AC_SUBST(EXT)
  102. AC_SUBST(CXXLIBS)
  103.  
  104.  
  105. dnl Adjust linker
  106.  
  107. case "$host" in
  108.     *sunos*)
  109.         case "$LD" in 
  110.             */ucb/*) LIBS="-L/usr/ucblib -R/usr/ucblib $LIBS" ;;
  111.         esac ;;
  112. esac        
  113.  
  114. dnl Checks for libraries.
  115.  
  116.  
  117. if test $ac_cv_prog_cxx_works = yes; then
  118.   AC_LANG_SAVE
  119.   AC_LANG_CPLUSPLUS
  120.   if test $ac_cv_prog_gxx = yes; then
  121.     AC_CHECK_LIB(g++, main, CXXLIBS="$CXXLIBS -lg++")
  122.   fi
  123.   AC_LANG_RESTORE
  124. fi
  125. AC_CHECK_LIB(m, ldexp, LIBS="$LIBS -lm")
  126. AC_CHECK_LIB(PW, alloca, LIBS="$LIBS -lPW")
  127.  
  128. AC_ARG_WITH(readline21,      [  --with-readline21    use readline 2.1 [default=yes]])
  129. AC_ARG_WITH(readline20,      [  --with-readline20    use readline 2.0 [default=yes]])
  130.  
  131. ac_save_LIBS="$LIBS"
  132. LIBS="$LIBS -lreadline"
  133. AC_TRY_LINK(,[(void)readline(0);], RLLIBS="-lreadline",
  134. LIBS="$LIBS -ltermcap"
  135. AC_TRY_LINK(,[(void)readline(0);], RLLIBS="-lreadline -ltermcap"))
  136. LIBS="$ac_save_LIBS"
  137.  
  138. AC_MSG_CHECKING(for readline)
  139. if test "x$with_readline21" = "x" || test "x$with_readline21" = "xyes"; then
  140.     ac_save_LIBS="$LIBS"
  141.     LIBS="$LIBS $RLLIBS"
  142.     AC_TRY_LINK([#include <stdio.h>
  143.     #include <readline/readline.h>], [rl_callback_read_char();], [RLDEFS="-DREADLINE_2_1"
  144.         with_readline20='no'
  145.         AC_MSG_RESULT(2.1)])
  146.     LIBS="$ac_save_LIBS"
  147. fi
  148. if test "x$with_readline20" = "x" || test "x$with_readline20" = "xyes"; then
  149.     ac_save_LIBS="$LIBS"
  150.     LIBS="$LIBS $RLLIBS"
  151.     AC_TRY_LINK([#include <stdio.h>
  152.     #include <readline/readline.h>], [
  153. extern void rl_deprep_terminal(void);
  154. extern int rl_getc(FILE * stream);
  155. extern void rl_gather_tyi(void);
  156.  
  157. rl_deprep_terminal();
  158. (void)rl_getc(stdin);
  159. rl_gather_tyi();], RLDEFS="-DREADLINE_2_0"; AC_MSG_RESULT(2.0))
  160.     LIBS="$ac_save_LIBS"
  161. fi
  162.  
  163. if test "x$RLDEFS" = "x"; then
  164.     AC_MSG_RESULT(none)
  165. fi
  166.  
  167. AC_SUBST(RLLIBS)
  168. AC_SUBST(RLDEFS)
  169.  
  170.  
  171. dnl Checks for header files.
  172. AC_HEADER_STDC
  173. AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h sys/time.h sys/ioctl_compat.h memory.h string.h strings.h unistd.h stdlib.h netinet/in.h dirent.h sys/ndir.h sys/dir.h ndir.h sys/select.h sockio.h netdb.h sys/utsname.h)
  174.  
  175. dnl Checks for typedefs, structures, and compiler characteristics.
  176. AC_C_CONST
  177. AC_HEADER_TIME
  178. AC_STRUCT_TM
  179.  
  180. dnl Find optional libraries (borrowed from Tcl)
  181. tcl_checkBoth=0
  182. AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
  183. if test "$tcl_checkSocket" = 1; then
  184.     AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", tcl_checkBoth=1)
  185. fi
  186. if test "$tcl_checkBoth" = 1; then
  187.     tk_oldLibs=$LIBS
  188.     LIBS="$LIBS -lsocket -lnsl"
  189.     AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
  190. fi
  191. AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
  192. AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
  193.  
  194. dnl Checks for library functions.
  195. AC_PROG_GCC_TRADITIONAL
  196. AC_TYPE_SIGNAL
  197. AC_CHECK_FUNCS(atexit strchr strdup memcpy memmove strtoul cfmakeraw cfsetspeed cfsetispeed cfsetospeed sigaction dup2 inet_aton gethostname uname)
  198.  
  199. AC_CACHE_CHECK([for cispeed and cospeed members of struct termios],
  200.   ac_cv_termios_cspeed,
  201. [AC_TRY_COMPILE([#include <termios.h>], [int main(void) {
  202.  struct termios t;t.c_ispeed=t.c_ospeed=0;}],
  203.   ac_cv_termios_cspeed=yes,ac_cv_termios_cspeed=no)])
  204. if test $ac_cv_termios_cspeed = yes; then
  205.   AC_DEFINE(TERMIOS_CSPEED)
  206. fi
  207.  
  208. AC_CACHE_CHECK([for sa_len],
  209.   ac_cv_sa_len,
  210. [AC_TRY_COMPILE([#include <sys/types.h>
  211. #include <sys/socket.h>], [int main(void) {
  212.  struct sockaddr t;t.sa_len = 0;}],
  213.   ac_cv_sa_len=yes,ac_cv_sa_len=no)])
  214. if test $ac_cv_sa_len = yes; then
  215.   AC_DEFINE(HAVE_SA_LEN)
  216. fi
  217.  
  218. dnl Check packages
  219. AC_ARG_WITH(tcl,      [  --with-tcl=tclbasedir   use Tcl     [default=yes]])
  220. AC_ARG_WITH(itcl,     [  --with-itcl=iclbasedir  use Itcl    [default=yes]])
  221. AC_ARG_WITH(tk,       [  --with-tk=tkbasedir     use Tk      [default=yes]])
  222. AC_ARG_WITH(python,   [  --with-python=pylibbase use Python  [default=yes]])
  223. AC_ARG_WITH(java,     [  --with-java=jdkbase     use Java    [default=yes]])
  224. AC_ARG_WITH(perl5,    [  --with-perl5=perl5exec  use Perl5   [default=yes]])
  225.  
  226. if test "x$with_perl5" = "xno"; then
  227.     PERL5=''
  228. else
  229.     if test "x$with_perl5" != "xyes" && test "x$with_perl5" != "x"; then
  230.         PERL5="$with_perl5"
  231.     else
  232.         AC_PATH_PROG(PERL5, perl)
  233.     fi
  234. fi
  235.  
  236. changequote(, )dnl
  237. if test "x$PERL5" != "x"; then
  238.     case `$PERL5 -e 'print $]'` in
  239.         *5.*) WITHPERL5='WITHPERL5' ;;
  240.         *)    PERL5='' ;;
  241.     esac
  242. fi
  243. changequote([, ])dnl
  244.  
  245. AC_MSG_CHECKING(for Java Development Kit)
  246. if test "x$with_java" = "xyes" || test "x$with_java" = "x" ; then
  247.     for java_path in /usr/local/java /usr/local /usr/java /usr; do
  248.         if test -f $java_path/bin/javac; then
  249.             with_java=$java_path; break
  250.         fi
  251.     done
  252.     if test "x$with_java" = "xyes"; then
  253.         echo "Unable to find Java base installation directory."
  254.         echo "Please give directory (such as /usr/local) as argument to --with-java=dir."
  255.         with_java=no
  256.     fi
  257. fi 
  258. if test "x$with_java" = "x"; then
  259.     with_java=no
  260. fi
  261. JAVABASE=''
  262. if test "x$with_java" != "xno"; then
  263.     # I'd like to check Java for version, but it doesn't seem to know how to do that. Odd.
  264. changequote(, )dnl
  265.     cat >test.java <<EOF
  266.     public class test { public static void main(String[] args) { 
  267.         System.out.println("present");
  268.     } }
  269. EOF
  270. changequote([, ])dnl
  271.     $with_java/bin/javac test.java
  272.     case `$with_java/bin/java test` in
  273.         *present*) AC_MSG_RESULT(found in $with_java) 
  274.             WITHJAVA='WITHJAVA'
  275.             JAVABASE="$with_java"
  276.             javaos="$host_os"
  277.             case "$javaos" in
  278.               linux-gnu) javaos="$javaos linux" ;;
  279.               solaris) javaos="$javaos sunos sun" ;;
  280.               sunos) javaos="$javaos solaris sun" ;;
  281.             esac
  282.             JAVAARCH="genunix"
  283.             for i in $javaos genunix; do
  284.               if test -f "$JAVABASE/include/$i/byteorder_md.h"; then
  285.                 JAVAARCH="$i"
  286.                 break
  287.               fi
  288.             done
  289.             JAVAMAJOR=1
  290.             if test -f "$JAVABASE/include/$JAVAARCH/jni_md.h"; then
  291.               JAVAMINOR=1
  292.             else
  293.               JAVAMINOR=0
  294.             fi
  295.             ;;
  296.         *)    AC_MSG_RESULT(not found)
  297.             with_java=no ;;
  298.     esac
  299.     rm -f test.java test.class
  300. else
  301.     AC_MSG_RESULT(not found)
  302. fi
  303. AC_SUBST(JAVABASE)
  304. AC_SUBST(JAVAARCH)
  305. AC_SUBST(JAVAMAJOR)
  306. AC_SUBST(JAVAMINOR)
  307.  
  308. if test "x$PERL5" = "x"; then
  309.     PERL5="/usr/bin/perl"
  310. fi
  311.  
  312. itcl=''
  313. if test "x$with_tcl" = "xyes" || test "x$with_tcl" = "x" ; then
  314.     for tcl_path in /usr/local/tcl8.0 /usr/local/tcl7.6 /usr/local/tcl7.5 /usr/local /usr /usr/local/tcl7.4; do
  315.         if test -f $tcl_path/lib/tclConfig.sh; then
  316.             with_tcl=$tcl_path; break
  317.         elif test -f $tcl_path/lib/itcl/tclConfig.sh; then
  318.             itcl='/itcl'
  319.             with_tcl=$tcl_path; break
  320.         fi
  321.     done
  322.     if test "x$with_tcl" = "xyes"; then
  323.         echo "Unable to find Tcl base installation directory."
  324.         echo "Please give directory (such as /usr/local) as argument to --with-tcl=dir."
  325.         with_tcl=no
  326.     fi
  327. else
  328.     if test -f $with_tcl/lib/itcl/tclConfig.sh; then
  329.         itcl='/itcl'
  330.     fi
  331. fi 
  332.  
  333. AC_MSG_CHECKING(for Tcl)
  334. TCL_VERSION=""
  335. TCL_LIBS=""
  336. TCL_LIB_SPEC=""
  337. TCL_PACKAGE_SPEC=""
  338. TCL_INC=""
  339. TCL_BIN=""
  340. TK_VERSION=""
  341. TK_LIBS=""
  342. TK_LIB_SPEC=""
  343. TK_INC=""
  344. TK_BIN=""
  345. TCLTK_FLAGS=""
  346. TCLTKFLAGS=""
  347. TCLLIBS=""
  348. TKLIBS=""
  349. TCLTKLIBS=""
  350. if test "x$with_tcl" = "x"; then
  351.     AC_MSG_RESULT(not found)
  352. elif test "x$with_tcl" = "xno"; then
  353.     AC_MSG_RESULT(not used)
  354. else
  355.     tclConfig="$with_tcl/lib$itcl/tclConfig.sh"
  356.     if test ! -f $tclConfig; then
  357.         AC_MSG_RESULT(Unable to find tclConfig.sh)
  358.     else
  359.         . $tclConfig
  360.         AC_MSG_RESULT(version $TCL_VERSION from $tclConfig)
  361.         TCL_INC="-I$TCL_PREFIX/include$itcl"
  362.         TCL_BIN="$TCL_EXEC_PREFIX/bin"
  363.         TCLLIBS="$TCL_LIB_SPEC $TCL_LIBS"
  364.         TCLTKLIBS="$TCLLIBS"
  365.         TCLTK_LIBS="\$(TCL_LIB_SPEC) \$(TCL_LIBS)"
  366.         TCLTK_FLAGS="-DTCL \$(TCL_INC)"
  367.         TCLTKFLAGS="-DTCL $TCL_INC"
  368.         WITHTCL='WITHTCL'
  369.         
  370.         if test "x$with_itcl" = "xyes" || test "x$with_itcl" = "x"; then
  371.             for itcl_path in $with_tcl; do
  372.                 if test -f $itcl_path/lib$itcl/itclConfig.sh; then
  373.                     with_itcl=$itcl_path; break
  374.                 fi
  375.             done
  376.             if test "x$with_itcl" = "xyes"; then
  377.                 echo "Unable to find Itcl base installation directory."
  378.                 echo "Please give directory (such as /usr/local/itcl2.2) as argument to --with-itcl=dir."
  379.                 with_itcl=no
  380.             fi
  381.         fi 
  382.  
  383.         AC_MSG_CHECKING(for Itcl)
  384.         if test "x$with_itcl" = "x"; then
  385.             AC_MSG_RESULT(not found)
  386.         elif test "x$with_itcl" = "xno"; then
  387.             AC_MSG_RESULT(not used)
  388.         else
  389.             itclConfig="$with_itcl/lib$itcl/itclConfig.sh"
  390.             if test ! -f $itclConfig; then
  391.                 AC_MSG_RESULT(Unable to find itclConfig.sh)
  392.             else
  393.                 . $itclConfig
  394.                 AC_MSG_RESULT(version $ITCL_VERSION from $itclConfig)
  395.                 ITCL_INC="-I$TK_PREFIX/include$itcl"
  396.                 #TK_BIN="$TK_EXEC_PREFIX/bin"
  397.                 #TKLIBS="$TK_LIB_SPEC $TCL_LIB_SPEC $TK_LIBS"
  398.                 #TCLTK_LIBS="\$(TK_LIB_SPEC) \$(TCL_LIB_SPEC) \$(TK_LIBS)"
  399.                 #TCLTK_FLAGS="$TCLTK_FLAGS -DTK \$(TK_INC)"
  400.                 #TCLTKLIBS="$TKLIBS"
  401.                 #WITHTK='WITHTK'
  402.                 if test "x$ITCL_INC" = "x$TCL_INC"; then
  403.                     ITCL_INC=" #same as TCL_INC"
  404.                 #    TCLTKFLAGS="-DTCL -DTK $TCL_INC"
  405.                 #else
  406.                 #    TCLTKFLAGS="-DTCL -DTK $TCL_INC $TK_INC"
  407.                 fi
  408.             fi
  409.         fi
  410.  
  411.         if test "x$with_tk" = "xyes" || test "x$with_tk" = "x"; then
  412.             for tk_path in $with_tcl; do
  413.                 if test -f $tk_path/lib$itcl/tkConfig.sh; then
  414.                     with_tk=$tk_path; break
  415.                 fi
  416.             done
  417.             if test "x$with_tk" = "xyes"; then
  418.                 echo "Unable to find Tk base installation directory."
  419.                 echo "Please give directory (such as /usr/local) as argument to --with-tk=dir."
  420.                 with_tk=no
  421.             fi
  422.         fi 
  423.         
  424.         AC_MSG_CHECKING(for Tk)
  425.         if test "x$with_tk" = "x"; then
  426.             AC_MSG_RESULT(not found)
  427.         elif test "x$with_tk" = "xno"; then
  428.             AC_MSG_RESULT(not used)
  429.         else
  430.             tkConfig="$with_tk/lib$itcl/tkConfig.sh"
  431.             if test ! -f $tkConfig; then
  432.                 AC_MSG_RESULT(Unable to find tkConfig.sh)
  433.             else
  434.                 . $tkConfig
  435.                 AC_MSG_RESULT(version $TK_VERSION from $tkConfig)
  436.                 TK_INC="-I$TK_PREFIX/include$itcl"
  437.                 TK_BIN="$TK_EXEC_PREFIX/bin"
  438.                 TKLIBS="$TK_LIB_SPEC $TCL_LIB_SPEC $TK_LIBS"
  439.                 TCLTK_LIBS="\$(TK_LIB_SPEC) \$(TCL_LIB_SPEC) \$(TK_LIBS)"
  440.                 TCLTK_FLAGS="$TCLTK_FLAGS -DTK \$(TK_INC)"
  441.                 TCLTKLIBS="$TKLIBS"
  442.                 WITHTK='WITHTK'
  443.                 if test "x$TK_INC" = "x$TCL_INC"; then
  444.                     TK_INC=" #same as TCL_INC"
  445.                     TCLTKFLAGS="-DTCL -DTK $TCL_INC"
  446.                 else
  447.                     TCLTKFLAGS="-DTCL -DTK $TCL_INC $TK_INC"
  448.                 fi
  449.             fi
  450.         fi
  451.  
  452.  
  453.     fi
  454. fi
  455.  
  456. TCL_PACKAGE_PATH=`echo $TCL_PACKAGE_PATH | sed 's/ .*//'`
  457.  
  458. AC_SUBST(TCL_VERSION)
  459. AC_SUBST(TCL_LIBS)
  460. AC_SUBST(TCL_LIB_SPEC)
  461. AC_SUBST(TCL_PACKAGE_PATH)
  462. AC_SUBST(TCL_INC)
  463. AC_SUBST(TCL_BIN)
  464. AC_SUBST(TK_VERSION)
  465. AC_SUBST(TK_LIBS)
  466. AC_SUBST(TK_LIB_SPEC)
  467. AC_SUBST(TK_INC)
  468. AC_SUBST(TK_BIN)
  469. AC_SUBST(TCLTK_LIBS)
  470. AC_SUBST(TCLTK_FLAGS)
  471. AC_SUBST(TCLLIBS)
  472. AC_SUBST(TKLIBS)
  473. AC_SUBST(TCLTKLIBS)
  474. AC_SUBST(TCLTKFLAGS)
  475.  
  476.  
  477. TCLEXECS=''
  478. if test ! "x$TCL_VERSION" = "x"; then
  479.     TCLEXECS='pilot-debug$(EXT)'
  480. fi
  481. AC_SUBST(TCLEXECS)
  482.  
  483.  
  484. if test "x$with_python" = "xyes" || test "x$with_python" = "x" ; then
  485.     for py_path in /usr /usr/local /usr/local/python1.3 /usr/local/python1.4 /usr/local/python1.5; do
  486.         for ver in 1.5 1.4 1.3; do
  487.             if test -f $py_path/lib/python$ver/config/Makefile ; then
  488.                 with_python=$py_path; break
  489.             fi
  490.         done
  491.     done
  492.     if test "x$with_python" = "xyes"; then
  493.         echo "Unable to find Python base directory."
  494.         echo "Please give directory (such as /usr/local/) as argument to --with-python=dir."
  495.         with_python=no
  496.     fi
  497. fi 
  498.  
  499. AC_MSG_CHECKING(for Python)
  500.  
  501. PYTHONBASE=''
  502. PYTHONLIBDIR=''
  503. PYTHONINCDIR=''
  504. PYTHONVER=''
  505. if test "x$with_python" = "x"; then
  506.     AC_MSG_RESULT(not found)
  507. elif test "x$with_python" = "xno"; then
  508.     AC_MSG_RESULT(not used)
  509. else
  510.     for ver in 1.5 1.4 1.3; do
  511.         if test -f $with_python/lib/python$ver/config/Makefile ; then
  512.             PYTHONVER=$ver; break
  513.         fi
  514.     done
  515.     
  516.     if test ! -f $with_python/include/python$PYTHONVER/Python.h; then
  517.         AC_MSG_RESULT(Unable to find $with_python/include/python$PYTHONVER/Python.h)
  518.     elif test ! -f $with_python/lib/python$PYTHONVER/config/Makefile; then
  519.         AC_MSG_RESULT(Unable to find $with_python/config/Makefile)
  520.     else
  521.         AC_MSG_RESULT(Python version $PYTHONVER in $with_python)
  522.         PYTHONBASE=$with_python
  523.         PYTHONLIBDIR=$with_python/lib/python$PYTHONVER
  524.         PYTHONINCDIR=$with_python/include/python$PYTHONVER
  525.         WITHPYTHON='WITHPYTHON'
  526.     fi
  527. fi
  528. AC_SUBST(PYTHONBASE)
  529. AC_SUBST(PYTHONLIBDIR)
  530. AC_SUBST(PYTHONINCDIR)
  531. AC_SUBST(PYTHONVER)
  532.  
  533. dnl Derive warning flag
  534. AC_CACHE_CHECK([for maximum warnings compiler flag],
  535.   ac_cv_cwflag,
  536. [case "${CC-cc}" in
  537.   *gcc*) ac_cv_cwflag=-Wall;;
  538.   *)    case "$host" in
  539.             *irix*)    ac_cv_cwflag=-fullwarn ;;
  540.             *)        ac_cv_cwflag=;;
  541.         esac ;;
  542. esac])
  543. CWFLAG=$ac_cv_cwflag
  544. AC_SUBST(CWFLAG)
  545.  
  546. dnl NeXT support
  547. case "$host" in
  548.     *next*) CPLIB="ln -s"
  549.             ARFLAGS="cur" ;;
  550.     *)      CPLIB="cp"
  551.             ARFLAGS="cur" ;;
  552. esac
  553. AC_SUBST(CPLIB)
  554. AC_SUBST(ARFLAGS)
  555.  
  556. AC_CONFIG_HEADER(include/pi-config.h)
  557.  
  558. if test $ac_cv_prog_cxx_works = yes; then
  559.   cc_m='libcc/Makefile'
  560. fi
  561.  
  562. AC_SUBST(WITHTCL)
  563. AC_SUBST(WITHJAVA)
  564. AC_SUBST(WITHTK)
  565. AC_SUBST(WITHPYTHON)
  566. AC_SUBST(WITHPERL5)
  567. AC_SUBST(WITHCXX)
  568.  
  569. LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/\.lo/g'`
  570. AC_SUBST(LTLIBOBJS)
  571. LTALLOCA=`echo "$ALLOCA" | sed 's/\.o/\.lo/g'`
  572. AC_SUBST(LTALLOCA)
  573. AC_OUTPUT(libsock/Makefile $cc_m Makefile Python/Makefile Tcl/Makefile Perl5/Makefile.PL Java/Makefile tests/Makefile)
  574.